AssignReal Subroutine

private subroutine AssignReal(mat, num)

assign value to mat

Arguments

Type IntentOptional Attributes Name
type(grid_real), intent(inout) :: mat
real(kind=float), intent(in) :: num

Variables

Type Visibility Attributes Name Initial
integer, public :: i
integer, public :: j

Source Code

SUBROUTINE AssignReal &
!
(mat, num)

IMPLICIT NONE

!Arguments with intent(in):
REAL (KIND = float),INTENT(IN) :: num

!Arguments with intent (inout)
TYPE(grid_real),INTENT(INOUT):: mat

!Local declarations:
INTEGER :: i,j

!---------------------------end of declarations--------------------------------


DO i = 1, mat % idim
  DO j = 1, mat % jdim
    IF (mat % mat (i,j) /= mat % nodata) THEN
      mat % mat(i,j) = num
    END IF
  END DO
END DO

END SUBROUTINE AssignReal